define(function(require,exports,module){
   var NavList=[{
   	   text:'首页',
   	   font:'xe60a',
   	   link:'#'
    },
   	{
       text:'订单',
       font:'xe622',
       link:'#/order'
    },
    {
       text:'公告',
       font:'xe601',
       link:'#/notice'
    },{
       text:'个人中心',
       font:'xe61e',
       link:'#/user'
    }],
    focusHash={'index':0,'order':1,'notice':2,'user':3},
    Vue=require('Vue'),
    vm;
	function initFooter(index){
		if(!vm)vm=new Vue({
	    	el:'#tabbar',
	     	data:{
	     		focus:index?index:0,
	     		show:true,
	        	navs:NavList
	     	},
	     	template:$('#tabbarTpl').html()
	   	});
	}
	exports.init=initFooter;
	exports.setFocus=function(i){
		if(!isNaN(i)){
			vm.focus=i;
		}
		else if(focusHash[i]!=undefined && !isNaN(focusHash[i])){
			vm.focus=focusHash[i];
		}
	}
	exports.setShow=function(i){
		vm.show=i
	}
});